package com.lemon.exam.common.entity.dto;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;

/**
 * 修改密码数据传输对象
 *
 * @author Lemon
 * @since 2025/4/23 21:56
 */
public record UpdatePasswordDTO(
        @Pattern(regexp = "^(email|phone)$", message = "请选择邮箱验证还是手机验证") String active,
        @Pattern(regexp = "^1[3-9]\\d{9}$", message = "请输入正确的手机号") String phone,
        @Email(message = "请输入正确的邮箱") String email,
        @NotBlank(message = "请输入验证码") String code,
        @NotBlank(message = "请输入新密码") String newPassword,
        @NotBlank(message = "请再次确认密码") String confirmPassword
) {
}
